package com.fyx.controller;

import com.fyx.annotation.Log;
import com.fyx.entity.FeedbackUrl;
import com.fyx.entity.UserEntity;
import com.fyx.service.IAdvertService;
import com.fyx.service.impl.AdvertServiceImpl;
import com.fyx.utils.PageUtil;
import com.fyx.utils.SecurityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@Api(tags = "广告数据")
@RestController
@RequestMapping("/api/advert")
@RequiredArgsConstructor
public class AdvertController {

    @Autowired
    IAdvertService advertService;

    @GetMapping(value = "setIpChannel")
    public ResponseEntity<Object> setIpChannel(String ip,String channel)  {
        String map=advertService.setIpChannel(ip,channel);
        return new ResponseEntity<>(HttpStatus.OK);
    }

    @GetMapping(value = "setFeedBackUrl")
    public ResponseEntity<Object> setFeedBackUrl(FeedbackUrl feedbackUrl)  {
        String map=advertService.setFeedBackUrl(feedbackUrl);
        return new ResponseEntity<>(HttpStatus.OK);
    }

}
